#ifndef CODETABLE_H
#define CODETABLE_H
const long ew[512] = {
0,-512,-512,-512,-512,-512,-512,-1024,
-1024,-1024,-1024,-1536,-1536,-2047,-2047,-2559,
-2559,-3071,-3584,-3584,-4096,-4608,-5119,-5631,
-6656,-7168,-8191,-8703,-9728,-10752,-12287,-13312,
-14847,-15872,-17919,-19456,-20991,-23040,-25087,-27135,
-29696,-32256,-34816,-37375,-40447,-43519,-46591,-49663,
-53247,-56832,-59904,-64000,-67584,-71167,-75263,-78848,
-82432,-86527,-90111,-93695,-97279,-100351,-103423,-106495,
109055,111616,113664,115199,116223,116736,116736,116223,
114688,113151,110080,106495,102399,96767,90623,83455,
74751,65023,54272,42495,29184,14847,-1024,-18431,
-36863,-56832,-78335,-100864,-124927,-150527,-177663,-205312,
-235007,-265727,-297471,-330240,-364031,-398847,-434176,-470527,
-507392,-544768,-582144,-619520,-656895,-694271,-731135,-766975,
-802304,-836608,-869375,-900608,-930303,-957439,-982528,-1004544,
-1024511,-1040383,-1053183,-1062399,-1067519,-1068543,-1064959,-1056255,
1042943,1023999,999423,969216,932863,890368,841727,785919,
723968,655360,579072,496639,406528,309759,205824,94720,
-23040,-147455,-279039,-416767,-560640,-710656,-866303,-1027071,
-1192960,-1363455,-1538048,-1715711,-1896960,-2080255,-2265599,-2451455,
-2638336,-2824704,-3010048,-3193343,-3373567,-3550720,-3722752,-3889664,
-4049920,-4203007,-4347391,-4482559,-4606976,-4720128,-4820992,-4907519,
-4980223,-5037056,-5076991,-5099007,-5102591,-5086719,-5049856,-4991999,
-4911103,-4807167,-4679168,-4526079,-4347903,-4143103,-3911680,-3652607,
3365887,3051008,2707456,2335231,1933311,1502719,1042943,553984,
35840,-510975,-1086463,-1689600,-2320896,-2978816,-3662847,-4372479,
-5107200,-5864960,-6645759,-7448576,-8271359,-9113088,-9972735,-10848768,
-11739647,-12643328,-13558784,-14483967,-15417344,-16356864,-17300991,-18247679,
-19194367,-20140031,-21082112,-22019072,-22948351,-23867904,-24775679,-25670144,
-26548735,-27409407,-28251136,-29070335,-29866496,-30637056,-31379968,-32094207,
-32777727,-33428479,-34044927,-34626047,-35170303,-35675647,-36142079,-36567040,
-36950528,-37291519,-37588480,-37840896,-38048256,-38210559,-38326271,-38395903,
38419456,38395903,38326271,38210559,38048256,37840896,37588480,37291519,
36950528,36567040,36142079,35675647,35170303,34626047,34044927,33428479,
32777727,32094207,31379968,30637056,29866496,29070335,28251136,27409407,
26548735,25670144,24775679,23867904,22948351,22019072,21082112,20140031,
19194367,18247679,17300991,16356864,15417344,14483967,13558784,12643328,
11739647,10848768,9972735,9113088,8271359,7448576,6645759,5864960,
5107200,4372479,3662847,2978816,2320896,1689600,1086463,510975,
-35840,-553984,-1042943,-1502719,-1933311,-2335231,-2707456,-3051008,
3365887,3652607,3911680,4143103,4347903,4526079,4679168,4807167,
4911103,4991999,5049856,5086719,5102591,5099007,5076991,5037056,
4980223,4907519,4820992,4720128,4606976,4482559,4347391,4203007,
4049920,3889664,3722752,3550720,3373567,3193343,3010048,2824704,
2638336,2451455,2265599,2080255,1896960,1715711,1538048,1363455,
1192960,1027071,866303,710656,560640,416767,279039,147455,
23040,-94720,-205824,-309759,-406528,-496639,-579072,-655360,
-723968,-785919,-841727,-890368,-932863,-969216,-999423,-1023999,
1042943,1056255,1064959,1068543,1067519,1062399,1053183,1040383,
1024511,1004544,982528,957439,930303,900608,869375,836608,
802304,766975,731135,694271,656895,619520,582144,544768,
507392,470527,434176,398847,364031,330240,297471,265727,
235007,205312,177663,150527,124927,100864,78335,56832,
36863,18431,1024,-14847,-29184,-42495,-54272,-65023,
-74751,-83455,-90623,-96767,-102399,-106495,-110080,-113151,
-114688,-116223,-116736,-116736,-116223,-115199,-113664,-111616,
109055,106495,103423,100351,97279,93695,90111,86527,
82432,78848,75263,71167,67584,64000,59904,56832,
53247,49663,46591,43519,40447,37375,34816,32256,
29696,27135,25087,23040,20991,19456,17919,15872,
14847,13312,12287,10752,9728,8703,8191,7168,
6656,5631,5119,4608,4096,3584,3584,3071,
2559,2559,2047,2047,1536,1536,1024,1024,
1024,1024,512,512,512,512,512,512
};

const long fl[16][32] = {
{
2147483647,2144896908,2137142926,2124240379,2106220350,2083126253,2055013722,2021950482,
1984016187,1941302224,1893911493,1841958163,1785567395,1724875039,1660027307,1591180424,
1518500249,1442161873,1362349203,1279254514,1193077990,1104027236,1012316783,918167571,
821806412,723465451,623381597,521795962,418953276,315101294,210490205,105372028
},{
2147483647,2124240379,2055013722,1941302224,1785567395,1591180424,1362349203,1104027236,
821806412,521795962,210490205,-105372028,-418953276,-723465451,-1012316783,-1279254514,
-1518500249,-1724875039,-1893911493,-2021950482,-2106220350,-2144896908,-2137142926,-2083126253,
-1984016187,-1841958163,-1660027307,-1442161873,-1193077990,-918167571,-623381597,-315101294
},{
2147483647,2083126253,1893911493,1591180424,1193077990,723465451,210490205,-315101294,
-821806412,-1279254514,-1660027307,-1941302224,-2106220350,-2144896908,-2055013722,-1841958163,
-1518500249,-1104027236,-623381597,-105372028,418953276,918167571,1362349203,1724875039,
1984016187,2124240379,2137142926,2021950482,1785567395,1442161873,1012316783,521795962
},{
2147483647,2021950482,1660027307,1104027236,418953276,-315101294,-1012316783,-1591180424,
-1984016187,-2144896908,-2055013722,-1724875039,-1193077990,-521795962,210490205,918167571,
1518500249,1941302224,2137142926,2083126253,1785567395,1279254514,623381597,-105372028,
-821806412,-1442161873,-1893911493,-2124240379,-2106220350,-1841958163,-1362349203,-723465451
},{
2147483647,1941302224,1362349203,521795962,-418953276,-1279254514,-1893911493,-2144896908,
-1984016187,-1442161873,-623381597,315101294,1193077990,1841958163,2137142926,2021950482,
1518500249,723465451,-210490205,-1104027236,-1785567395,-2124240379,-2055013722,-1591180424,
-821806412,105372028,1012316783,1724875039,2106220350,2083126253,1660027307,918167571
},{
2147483647,1841958163,1012316783,-105372028,-1193077990,-1941302224,-2137142926,-1724875039,
-821806412,315101294,1362349203,2021950482,2106220350,1591180424,623381597,-521795962,
-1518500249,-2083126253,-2055013722,-1442161873,-418953276,723465450,1660027307,2124240379,
1984016187,1279254514,210490205,-918167571,-1785567395,-2144896908,-1893911493,-1104027236
},{
2147483647,1724875039,623381597,-723465451,-1785567395,-2144896908,-1660027307,-521795962,
821806412,1841958163,2137142926,1591180424,418953276,-918167571,-1893911493,-2124240379,
-1518500249,-315101294,1012316783,1941302224,2106220350,1442161873,210490205,-1104027236,
-1984016187,-2083126253,-1362349203,-105372028,1193077990,2021950482,2055013722,1279254514
},{
2147483647,1591180424,210490205,-1279254514,-2106220350,-1841958163,-623381597,918167571,
1984016187,2021950482,1012316783,-521795962,-1785567395,-2124240379,-1362349203,105372028,
1518500249,2144896908,1660027307,315101294,-1193077990,-2083126253,-1893911493,-723465451,
821806412,1941302224,2055013722,1104027236,-418953276,-1724875039,-2137142926,-1442161873
},{
2147483647,1442161873,-210490205,-1724875039,-2106220350,-1104027236,623381597,1941302224,
1984016187,723465451,-1012316783,-2083126253,-1785567395,-315101294,1362349203,2144896908,
1518500249,-105372028,-1660027307,-2124240379,-1193077990,521795962,1893911493,2021950482,
821806412,-918167571,-2055013722,-1841958163,-418953276,1279254514,2137142926,1591180424
},{
2147483647,1279254514,-623381597,-2021950482,-1785567395,-105372028,1660027307,2083126253,
821806412,-1104027236,-2137142926,-1442161873,418953276,1941302224,1893911493,315101294,
-1518500249,-2124240379,-1012316783,918167571,2106220350,1591180424,-210490205,-1841958163,
-1984016187,-521795962,1362349203,2144896908,1193077990,-723465450,-2055013722,-1724875039
},{
2147483647,1104027236,-1012316783,-2144896908,-1193077990,918167571,2137142926,1279254514,
-821806412,-2124240379,-1362349203,723465450,2106220350,1442161873,-623381597,-2083126253,
-1518500249,521795962,2055013722,1591180424,-418953276,-2021950482,-1660027307,315101294,
1984016187,1724875039,-210490205,-1941302224,-1785567395,105372028,1893911493,1841958163
},{
2147483647,918167571,-1362349203,-2083126253,-418953276,1724875039,1893911493,-105372028,
-1984016187,-1591180424,623381597,2124240379,1193077990,-1104027236,-2137142926,-723465451,
1518500249,2021950482,210490205,-1841958163,-1785567395,315101294,2055013722,1442161873,
-821806412,-2144896908,-1012316783,1279254514,2106220350,521795962,-1660027307,-1941302224
},{
2147483647,723465451,-1660027307,-1841958163,418953276,2124240379,1012316783,-1442161873,
-1984016187,105372028,2055013722,1279254514,-1193077990,-2083126253,-210490205,1941302224,
1518500249,-918167571,-2137142926,-521795962,1785567395,1724875039,-623381597,-2144896908,
-821806412,1591180424,1893911493,-315101294,-2106220350,-1104027236,1362349203,2021950482
},{
2147483647,521795962,-1893911493,-1442161873,1193077990,2021950482,-210490205,-2124240379,
-821806412,1724875039,1660027307,-918167571,-2106220350,-105372028,2055013722,1104027236,
-1518500249,-1841958163,623381597,2144896908,418953276,-1941302224,-1362349203,1279254514,
1984016187,-315101294,-2137142926,-723465451,1785567395,1591180424,-1012316783,-2083126253
},{
2147483647,315101294,-2055013722,-918167571,1785567395,1442161873,-1362349203,-1841958163,
821806412,2083126253,-210490205,-2144896908,-418953276,2021950482,1012316783,-1724875039,
-1518500249,1279254514,1893911493,-723465450,-2106220350,105372028,2137142926,521795962,
-1984016187,-1104027236,1660027307,1591180424,-1193077990,-1941302224,623381597,2124240379
},{
2147483647,105372028,-2137142926,-315101294,2106220350,521795962,-2055013722,-723465451,
1984016187,918167571,-1893911493,-1104027236,1785567395,1279254514,-1660027307,-1442161873,
1518500249,1591180424,-1362349203,-1724875039,1193077990,1841958163,-1012316783,-1941302224,
821806412,2021950482,-623381597,-2083126253,418953276,2124240379,-210490205,-2144896908
}
};

const long ca[8] = {
-1104871221,-1013036688,-672972958,-390655621,-203096531,-87972919,-30491193,-7945635
};

const long cs[8] = {
1841452035,1893526520,2039311994,2111652007,2137858230,2145680959,2147267170,2147468947
};

const long cos_l[18][36] = {
{
63283832,170637571,249737143,298179147,314491698,298179147,249737143,170637571,63283832,
-69062184,-222379212,-392008792,-572796813,-759250124,-945703435,-1126491457,-1296121036,-1449438064,
-1581784081,-1689137820,-1768237392,-1816679397,-1832991948,-1816679397,-1768237392,-1689137820,-1581784081,
-1449438064,-1296121036,-1126491457,-945703435,-759250124,-572796813,-392008792,-222379212,-69062184
},{
-74314931,-258966078,-460824098,-640236213,-759250124,-786687264,-702414579,-500284046,-189369869,
206660948,651982862,1102570034,1511212175,1832991948,2030569848,2078643179,1967042654,1702091766,
1306060948,814775745,273658566,-267329592,-759250124,-1159593886,-1436897244,-1574025869,-1569745749,
-1438406965,-1207792529,-915404502,-603646369,-314491698,-84288696,60668643,107267261,57023852
},{
-50329886,-36586865,139768215,436269664,759250124,990653814,1023470462,795836990,314014687,
-342686898,-1037154958,-1606526823,-1903028272,-1832991948,-1383670599,-630453677,277904833,1152743920,
1809445506,2110896781,1999543607,1510011487,759250124,-83088008,-836304930,-1351646656,-1545760704,
-1416428721,-1037154958,-532784999,-43252879,314491698,476104793,443288145,277904833,79002096
},{
83088008,277904833,342686898,139768215,-314491698,-836304930,-1152743920,-1037154958,-436269664,
476104793,1351646656,1809445506,1606526823,759250124,-443288145,-1545760704,-2110896781,-1903028272,
-990653814,277904833,1416428721,1999543607,1832991948,1023470462,-79002096,-1037154958,-1510011487,
-1383670599,-795836990,-50329886,532784999,759250124,630453677,314014687,36586865,-43252879
},{
35846692,-107267261,-429419697,-596605174,-314491698,379467971,1066011120,1207792529,555204365,
-605899243,-1574025869,-1673302281,-728951191,759250124,1892189868,1936987082,814775745,-821024235,
-1982127844,-1967042654,-802326319,783770706,1832991948,1759843851,693104498,-651982862,-1462770171,
-1340381908,-500284046,441556263,916116723,759250124,247121954,-177871462,-258966078,-86541570
},{
-89336498,-222379212,20274314,544629123,759250124,214621000,-779524439,-1296121036,-669913625,
731082434,1689137820,1223608269,-412283106,-1832991948,-1727342898,-91451522,1689137820,2046142226,
645146165,-1296121036,-2094584230,-1100438790,759250124,1859688915,1335334105,-222379212,-1404396290,
-1286892101,-170637571,850701647,968092773,314491698,-346967017,-464358144,-170637571,28167689
},{
-20274314,222379212,412283106,-28167689,-759250124,-731082434,346967017,1296121036,779524439,
-850701647,-1689137820,-544629123,1404396290,1832991948,89336498,-1859688915,-1689137820,464358144,
2094584230,1296121036,-968092773,-2046142226,-759250124,1286892101,1727342898,222379212,-1335334105,
-1223608269,170637571,1100438790,669913625,-314491698,-645146165,-214621000,170637571,91451522
},{
92870544,107267261,-368751054,-512316477,314491698,983114341,150606618,-1207792529,-883202600,
963846506,1574025869,-236405037,-1888545077,-759250124,1624860276,1663328516,-814775745,-2127085184,
-280036077,1967042654,1276316860,-1246799142,-1832991948,248631676,1795674533,651982862,-1256109222,
-1151012038,500284046,1143970843,129429458,-759250124,-393114259,282952635,258966078,-12226639
},{
4085911,-277904833,-100601247,615873008,314491698,-879557809,-619958920,1037154958,980159057,
-1069655911,-1351646656,973140575,1689614832,-759250124,-1953299633,453782903,2110896781,-93582766,
-2143397735,-277904833,2046882399,615873008,-1832991948,-879557809,1527524726,1037154958,-1167324589,
-1069655911,795836990,973140575,-457868814,-759250124,194184013,453782903,-36586865,-93582766
},{
-93582766,36586865,453782903,-194184013,-759250124,457868814,973140575,-795836990,-1069655911,
1167324589,1037154958,-1527524726,-879557809,1832991948,615873008,-2046882399,-277904833,2143397735,
-93582766,-2110896781,453782903,1953299633,-759250124,-1689614832,973140575,1351646656,-1069655911,
-980159057,1037154958,619958920,-879557809,-314491698,615873008,100601247,-277904833,-4085911
},{
12226639,258966078,-282952635,-393114259,759250124,129429458,-1143970843,500284046,1151012038,
-1256109222,-651982862,1795674533,-248631676,-1832991948,1246799142,1276316860,-1967042654,-280036077,
2127085184,-814775745,-1663328516,1624860276,759250124,-1888545077,236405037,1574025869,-963846506,
-883202600,1207792529,150606618,-983114341,314491698,512316477,-368751054,-107267261,92870544
},{
91451522,-170637571,-214621000,645146165,-314491698,-669913625,1100438790,-170637571,-1223608269,
1335334105,222379212,-1727342898,1286892101,759250124,-2046142226,968092773,1296121036,-2094584230,
464358144,1689137820,-1859688915,-89336498,1832991948,-1404396290,-544629123,1689137820,-850701647,
-779524439,1296121036,-346967017,-731082434,759250124,-28167689,-412283106,222379212,20274314
},{
-28167689,-170637571,464358144,-346967017,-314491698,968092773,-850701647,-170637571,1286892101,
-1404396290,222379212,1335334105,-1859688915,759250124,1100438790,-2094584230,1296121036,645146165,
-2046142226,1689137820,91451522,-1727342898,1832991948,-412283106,-1223608269,1689137820,-731082434,
-669913625,1296121036,-779524439,-214621000,759250124,-544629123,20274314,222379212,-89336498
},{
-86541570,258966078,-177871462,-247121954,759250124,-916116723,441556263,500284046,-1340381908,
1462770171,-651982862,-693104498,1759843851,-1832991948,783770706,802326319,-1967042654,1982127844,
-821024235,-814775745,1936987082,-1892189868,759250124,728951191,-1673302281,1574025869,-605899243,
-555204365,1207792529,-1066011120,379467971,314491698,-596605174,429419697,-107267261,-35846692
},{
43252879,36586865,-314014687,630453677,-759250124,532784999,50329886,-795836990,1383670599,
-1510011487,1037154958,-79002096,-1023470462,1832991948,-1999543607,1416428721,-277904833,-990653814,
1903028272,-2110896781,1545760704,-443288145,-759250124,1606526823,-1809445506,1351646656,-476104793,
-436269664,1037154958,-1152743920,836304930,-314491698,-139768215,342686898,-277904833,83088008
},{
79002096,-277904833,443288145,-476104793,314491698,43252879,-532784999,1037154958,-1416428721,
1545760704,-1351646656,836304930,-83088008,-759250124,1510011487,-1999543607,2110896781,-1809445506,
1152743920,-277904833,-630453677,1383670599,-1832991948,1903028272,-1606526823,1037154958,-342686898,
-314014687,795836990,-1023470462,990653814,-759250124,436269664,-139768215,-36586865,50329886
},{
-57023852,107267261,-60668643,-84288696,314491698,-603646369,915404502,-1207792529,1438406965,
-1569745749,1574025869,-1436897244,1159593886,-759250124,267329592,273658566,-814775745,1306060948,
-1702091766,1967042654,-2078643179,2030569848,-1832991948,1511212175,-1102570034,651982862,-206660948,
-189369869,500284046,-702414579,786687264,-759250124,640236213,-460824098,258966078,-74314931
},{
-69062184,222379212,-392008792,572796813,-759250124,945703435,-1126491457,1296121036,-1449438064,
1581784081,-1689137820,1768237392,-1816679397,1832991948,-1816679397,1768237392,-1689137820,1581784081,
-1449438064,1296121036,-1126491457,945703435,-759250124,572796813,-392008792,222379212,-69062184,
-63283832,170637571,-249737143,298179147,-314491698,298179147,-249737143,170637571,-63283832
}
};

#endif